<template>
  <div class="block-item-com">
    <div class="corner lb"></div>
    <div class="corner lu"></div>
    <div class="corner rb"></div>
    <div class="corner ru"></div>
    <div v-if="title.length>0" class="title fzhzgbj">{{title}}</div>
    <div :style="`height:${title.length>0?'calc(100% - 40px)':'100%'}`" class="item-content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "BlockItem",
  props:{
    title:{
      type:String,
      default:'',
    }
  }
}
</script>

<style scoped lang="scss">
$offset:-4px;
.block-item-com{
  position: relative;
  padding: 15px;
  padding-top: 5px;
  border: 1px solid #06aaf2;
  box-shadow:inset 0 0 30px 0 #06aaf28f;
  .title{
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
  }
  .item-content{
    width: 100%;
  }
  .corner{
    width: 25px;
    height: 25px;
    position: absolute;
  }
  .corner.lb{
    background: url("/static/images/lb.png") no-repeat center;
    background-size: 100% 100%;
    left:$offset;
    bottom:$offset;
  }
  .corner.lu{
    background: url("/static/images/lu.png") no-repeat center;
    background-size: 100% 100%;
    left:$offset;
    top:$offset;
  }
  .corner.rb{
    background: url("/static/images/rb.png") no-repeat center;
    background-size: 100% 100%;
    right: $offset;
    bottom: $offset;
  }
  .corner.ru{
    background: url("/static/images/ru.png") no-repeat center;
    background-size: 100% 100%;
    right: $offset;
    top: $offset;
  }
}
</style>
